<html>
    <head>
    </head>
    <form name= "form" action = "" value = "Submit" method = "Post">

        <tr>
            <!-- creating the check box and rename it with allow  -->
            <td> <input type="checkbox" name="allow" /></td>
            <!-- the sentence which beside the checkbox  -->
            <td> <label><b>Allow reviewers to see other reviews</b></label></td>

        </tr>
        <tr>
            <!-- creating  button with submit type   -->

            <td> <input type ="submit" name="submit"></td>
        </tr>
        <?php
		//Author :Mohamed Tarek 
        //connect to the database
        $conn = @mysql_connect("localhost", "root", "") or die(mysql_error());
        mysql_select_db("mydb") or die(mysql_error());
        //if submit button was clicked    
        if (isset($_POST['submit'])) {
            // if there is any action happend in the checkbox 'allow' 
            if (isset($_POST['allow'])) {
                // the query which updates in the database.
                mysql_query("UPDATE conference SET view_review = 1 WHERE conference_id = 2");
            }
        }
		//End of Documntation
        ?>   


    </form>
</html>
